import React, { Component } from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    Image,
    View,
    TextInput,
    Alert,
    TouchableWithoutFeedback,
    ViewPagerAndroid,
} from 'react-native';
import MySceme from './myScene';
import ChatListScene from './chatListScene';
import FriendScene from './friendScene';
import DiscoverScene from './discoverScene';
import Entypo from 'react-native-vector-icons/Feather';
import SimpleLineIcons from 'react-native-vector-icons/SimpleLineIcons';

import {
    StackNavigator,
    createBottomTabNavigator,
} from 'react-navigation';
const HomeTab = createBottomTabNavigator({
    
    msgList: {
        screen: ChatListScene,
        navigationOptions: {
            title: '随聊',
            tabBarIcon: ({ focused, tintColor }) => {
                return (
                    <SimpleLineIcons name='bubbles' size={20} color={focused ? "#10B1F6" : "#a5a5a5"}></SimpleLineIcons>
                );
            },
        },
    },
    friend: {
        screen: FriendScene,
        navigationOptions: {
            title: '通讯录',
            tabBarIcon: ({ focused, tintColor }) => {
                return (
                    <SimpleLineIcons name='people' size={20} color={focused ? "#10B1F6" : "#a5a5a5"}></SimpleLineIcons>
                );
            },
        },
    },
    discover: {
        screen: DiscoverScene,
        navigationOptions: {
            title: '发现',
            tabBarIcon: ({ focused, tintColor }) => {
                return (
                    <SimpleLineIcons name='puzzle' size={20} color={focused ? "#10B1F6" : "#a5a5a5"}></SimpleLineIcons>
                );
            },
        },
    },
    my: {
        screen: MySceme,
        navigationOptions: {
            title: '我的',
            tabBarIcon: ({ focused, tintColor }) => {
                return (
                    <SimpleLineIcons name='user' size={20} color={focused ? "#10B1F6" : "#a5a5a5"}></SimpleLineIcons>
                );
            },
        },
    },

}, {
        tabBarOptions: {
            activeTintColor: '#10B1F6',
            inactiveTintColor: '#999999',
            showIcon: true,
            labelStyle: {
                fontSize: 12,
                marginTop: 0,
                marginBottom: 0,
            },
            style: {
                marginBottom: -2,
                backgroundColor: '#FCFCFC',
                color: 'rgba(25,177,249,1)',
            },
        },
        tabBarPosition: 'bottom',
    });

export default class HomeScene extends Component{
    static navigationOptions = {
        // headerTitle instead of title
        headerTitle: "123123" ,
    };
    
    render(){
        return(
            <View >
            </View>
        )
    }
    
}



const styles = StyleSheet.create({
    viewPager: {
        flex: 1
    },
    pageStyle: {
        alignItems: 'center',
        padding: 20,
    },
    title: {
        // flex: 1,
        justifyContent: 'center',
        alignItems: 'center', 
        backgroundColor: 'rgb(250,248,249)',
        height: 45,
    },
    titleText:{
        textAlign: 'center',
        color: 'rgb(30,30,30)',
        // fontSize: 16,
        alignItems: 'center',  
        justifyContent: 'center',
    },
    edit:{
        position :'absolute',
        right:10,
        fontSize:30,
        height: 30,
        width: 30,
    },
    tab:{
        padding:5,
        height: 55,
        backgroundColor: 'rgb(250,248,249)',
        flexDirection: 'row',
    },
    tabChild:{
        flex:1,
        justifyContent: 'center',
        alignItems:'center',
    },
    tabChildIcon:{
        textAlign: 'center',
        fontSize: 24,
    },
    tabChildText:{
        fontSize: 12,
        color: true ? "rgba(25,177,249,1)" : "#a5a5a5",
    }

})


